home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / cpcug.zip / ATTR.DOC < prev    next >
Text File  |  1987-04-20  |  4KB  |  91 lines

  1.           ATTR (Attribute)                       Charles Petzold
  2.           Command
  3.           Copyright (c) 1986, Ziff-Davis Publishing Co.
  4.           ______________________________________________________
  5.  
  6.           Purpose:  ATTR.COM permits display and modification of
  7.                     the archive, system, hidden, and read-only
  8.                     file attributes.
  9.  
  10.           Format:   ATTR
  11.                       or
  12.                     ATTR *.*
  13.                       or
  14.                     ATTR [+A|-A] [+S|-S] [+H|-H] [+R|-R]
  15.                     [d:][path]filename[.ext]
  16.  
  17.           Remarks:  Entering ATTR without any parameters, as in
  18.                     the first format shown above, produces a help
  19.                     display (essentially identical to the third
  20.                     form above) that shows which file attributes
  21.                     can be changed.
  22.  
  23.                     ATTR.COM permits the use of the global ? and
  24.                     * characters (as in the second format above).
  25.                     Entering ATTR filename displays a specific
  26.                     file's attributes.  For example,
  27.  
  28.                          ATTR IBMBIO.COM
  29.  
  30.                     returns the display
  31.  
  32.                          IBMBIO.COM    Arc     Sys Hid R-O
  33.  
  34.                     showing that the Archive, System, Hidden, and
  35.                     Read-Only bits of the attribute byte are set
  36.                     for this file.
  37.  
  38.                     When wildcards are used to list the
  39.                     attributes of all the files in a directory,
  40.                     subdirectory names are shown as Dir (between
  41.                     the Arc and Sys in the example above).
  42.                     Unlike the DOS DIR command, ATTR lists hidden
  43.                     files, whether sought by specified filename
  44.                     or through a *.* listing.  However, ATTR does
  45.                     not show Volume names or the dot and double-
  46.                     dot entries in subdirectories.
  47.  
  48.                     The syntax for changing file attributes is
  49.                     indicated in the third format above.  After
  50.                     typing ATTR (and a space) you simply precede
  51.                     the file specification with a plus or minus
  52.                     sign, followed by the letter A (Archive), S
  53.                     (System), H (Hidden), or R (Read-Only).  A
  54.                     plus sign turns on the specified attribute; a
  55.                     minus sign turns it off.  More than one
  56.                     attribute can be changed at once, and the
  57.                     attribute-designating letters may be entered
  58.  
  59.  
  60.  
  61.  
  62.                                  Page -1-
  63.                     in any order and in upper- or lowercase.  No
  64.                     space may be used between the plus or minus
  65.                     and the letter that follows it, however.
  66.  
  67.           Example:  To convert the file 85TAX.WKS to hidden and
  68.                     read-only, you would enter
  69.  
  70.                     ATTR +H +R 85TAX.WKS
  71.  
  72.                     Since DOS itself normally sets the Archive
  73.                     bit, entering
  74.  
  75.                           ATTR 85TAX.WKS
  76.  
  77.                     would produce the display
  78.  
  79.                          85TAX.WKS     Arc         Hid R-O
  80.  
  81.                     Since the Hidden attribute has been set,
  82.                     however, the  DIR command will produce the
  83.                     message, "File not found."  And since the
  84.                     Read-Only flag has also been set, a DEL
  85.                     command will produce the message, "Access
  86.                     denied."
  87.  
  88.                     Notes:
  89.  
  90.                     1.   Requires DOS 2.0 or later.
  91.